<template>
    <div v-if= 'isShowInfo' class="background">
        <img @click= "close(false)" class= "exitButton" src= "../../assets/exitButton.png" alt="">
        <div class="infoBox">
            <div class="title">
                <img class= "titleImage" :src= "fireControlDectectorInfo.imageUrl" alt="">
                <span>{{fireControlDectectorInfo.detectorName}}</span>
            </div>
            <span class="detailInfo">编号：{{fireControlDectectorInfo.number}}</span>
            <span class="detailInfo">位置：{{fireControlDectectorInfo.location}}</span>
            <span class="detailInfo">保质期：{{fireControlDectectorInfo.qualityGuaranteePeriod}}</span>
        </div>
    </div>
</template>

<script>
export default {
    name:'fireControlDectectorInfo',
    data(){
        return{
            fireControlDectectorInfo:{},//消防设备信息
            isShowInfo:false, //是否显示信息
        }
    },
    methods:{
        show(isShow){
            this.isShowInfo =  isShow;
        },
        init(data){
            this.fireControlDectectorInfo = data;
            this.show(true);
        }
    },
}
</script>

<style scoped>
    .background{
        position: absolute;
        left: 29px;
        top: 284px;
        display: flex;
        width: 401.3px;
        height: 186.5px;
        background-image: url('../../assets/regionBackground.png');
        background-size: 100% 100%;
    }

     .exitButton{
        width: 24px;
        height: 22px;
        position: absolute;
        right: 30px;
        top: 20px;  
        z-index: 2;
        cursor: pointer; 
    }

    .infoBox{
        display: flex;
        flex-direction: column;
        width: 323px;
        height: 120px;
        padding:26px 0 40px 24px;
    }

    .title{
        width: 100%;
        line-height: 29px;
        margin-bottom: 5px;
        font-size: 16px;
        font-weight: bold;
        color: #BED8FF;       
        text-align: left;
    }
    .titleImage{
        width: 18px;
        height: 29px;
        margin-right: 9px;
        vertical-align:middle;
    }

    .detailInfo{
        width: 100%;
        line-height: 29px;
        font-size: 14px;
        color: #fff;
        text-align: left;
    }
</style>